﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.Model
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.cols = 9;
}
@functions{
    B_Exam_Class classBll = new B_Exam_Class();
    public string GetClass(string classid)
    {
        M_Exam_Class mquestion = classBll.GetSelect(DataConverter.CLng(classid));
        if (mquestion != null && mquestion.C_id > 0)
        {
            return mquestion.C_ClassName;
        }
        else
        {
            return "无分类";
        }
    }
}
<table id="EGV" class="table table-striped table-bordered table-hover">
    <tr>
        <td></td>
        <td>课程名称</td>
        <td>课程缩写</td>
        <td>课程代码</td>
        <td>热门课程</td>
        <td>课程分类</td>
        <td>学分</td>
        <td>简介</td>
        <td>操作</td>
    </tr>
    @if (Model.itemCount > 0)
    {
        foreach (DataRow dr in Model.dt.Rows)
        {
            <tr>
                <td><input name="idchk" type="checkbox" value='@dr["ID"]' /></td>
                <td>@dr["CourseName"]</td>
                <td>@dr["CoureseThrun"]</td>
                <td>@dr["CoureseCode"]</td>
                <td>@(DataConverter.CLng(dr["Hot"]) == 1 ? "是" : "否")</td>
                <td>@GetClass(dr["CoureseClass"].ToString())</td>
                <td>@dr["CoureseCredit"]</td>
                <td>@dr["CoureseRemark"]</td>
                <td>
                    <a href="AddCourse?id=@dr["ID"]" class="option_style"><i class="fa fa-pencil" title="修改"></i></a>
                    <a href="javascript:;" onclick='mvapage.del({url: "Course_Del", ids: @dr["ID"], confirm: "确定要删除此课程吗？"});' class="option_style"><i class="fa fa-trash-o" title="删除"></i></a>
                </td>
            </tr>
        }
    }
    else
    {
        <tr><td colspan="9">当前没有数据</td></tr>
    }
    @Html.Partial("_page", Model)
</table>